<html>
  <head>
    <style>
      body {
        margin: 0px;
        padding: 0px;
      }
      div {
        margin: 0px;
        padding: 20px;
        border: 1px solid #000;
      }
    </style>
    <script>
      var hasLeave = false;
      function done() {
        document.getElementById("status").innerHTML += 'done';
        document.title = hasLeave ? "with mouseleave" : "without mouseleave";
      }
      function log(text) {
        document.getElementById("status").innerHTML += text + ',';
        document.title = text;
        hasLeave |= (text == "onmouseout");
      }
    </script>
  </head>
  <body onload="log('onload')">
    <div id="box" onmouseover="log('onmouseover')" onmouseout="log('onmouseout')"
         onclick="log('onclick')" ondblclick="log('ondblclick')"></div>
    <div id="status"></div>
  </body>
</html>
